#!/sbin/openrc-run

#---------------------------------------------------------------------------
# This script starts/stops the MIT Kerberos 5 Admin daemon
#---------------------------------------------------------------------------

daemon="MIT Kerberos 5 Admin daemon"
exec="/usr/sbin/kadmind"

depend() {
	need krb5kdc
	use net
}

start() {
	ebegin "Starting $daemon"
	start-stop-daemon --start --quiet --exec ${exec} 1>&2
	eend $? "Error starting $daemon"
}

stop() {
	ebegin "Stopping $daemon"
	start-stop-daemon --stop --quiet --exec ${exec} 1>&2
	eend $? "Error stopping $daemon"
}
